package cn.caskm.souvenirshopsystem.domain.po;

import cn.caskm.souvenirshopsystem.utils.DateUtils;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("goods_comment")
public class GoodsComment implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 评价ID
     */
    @TableId(value = "comment_id", type = IdType.AUTO)
    private Integer commentId;

    /**
     * 订单ID
     */
    private Integer orderId;

    /**
     * 商品ID
     */
    private Integer goodsId;

    /**
     * 评价人
     */
    private Integer userId;

    /**
     * 等级
     */
    private Integer rating;

    /**
     * 内容
     */
    private String comment;

    /**
     * 评价时间
     */
    @JsonFormat(pattern = DateUtils.DATE_TIME_FORMAT)
    private LocalDateTime commentTime;

    /**
     * 图片
     */
    private String image;

    /**
     * 回复内容
     */
    private String reply;


}
